<form action="index.php" method="post" name="adminForm" id="adminForm">
<script type="text/javascript">
jQuery(document).ready(
  function(){
    jQuery("#adminForm").validate({
      rules:  {
        name: "required",
      }
    });
  }
);
<? 
  $id          = 0;
  $name        = null;
  $abbr        = null;
  $description = null;
  $published   = true;
  
  if($this->team){
    
    $id       = $this->team->id;
    $name        = $this->team->name;
    $abbr        = $this->team->abbr;
    $description = $this->team->description;
    $published   = $this->team->published;
  }
  
  $logo_pic_id    = null;
  $logo_flickr_id = null;
  $logo_pic_url   = null;
  if($this->logo){
    $logo_pic_id    = $this->logo->id;
    $logo_flickr_id = $this->logo->flickr_id;
    $logo_pic_url   = PBNYHelper::getFlickrImageUrl($logo_flickr_id);
  }
  
  $pic_id        = null;
  $pic_flickr_id = null;
  $pic_url       = null;
  if($this->pic){
    $pic_id        = $this->pic->id;
    $pic_flickr_id = $this->pic->flickr_id;
    $pic_url       = PBNYHelper::getFlickrImageUrl($pic_flickr_id);
  }
?>
</script>
  <fieldset class="adminForm">
    <legend>Details</legend>
            <table class="admintable">
        <tr>
          <td></td>
          <td><img src="<?= PBNYHelper::getFlickrImageUrl($logo_flickr_id, 'medium') ?>" width="300px" height="300px"/>Logo</td>
          <td><img src="<?= PBNYHelper::getFlickrImageUrl($pic_flickr_id, 'medium') ?>" width="300px" height="300px"/>Team Pic</td>
        </tr>
        <tr>
          <td class="key">URLs</td>
          <td>
		    <input type="hidden" id="old_logo_pic_url" name="old_logo_pic_url" value="<?= $logo_pic_url ?>"/>
            <input type="hidden" id="logo_flickr_id" name="logo_flickr_id" value="<?= $logo_flickr_id ?>"/>
            <textarea id="logo_pic_url" name="logo_pic_url" rows="2" cols="40"><?= $logo_pic_url ?></textarea>
		  </td>
          <td>
		    <input type="hidden" id="old_pic_url" name="old_pic_url" value="<?= $pic_url ?>"/>
            <input type="hidden" id="pic_flickr_id" name="pic_flickr_id" value="<?= $pic_flickr_id ?>"/>
            <textarea id="pic_url" name="pic_url" rows="2" cols="40"><?= $pic_url ?></textarea>
		  </td>
        </tr>
          <tr>
            <td class="key">Name</td>
          <td>
            <input type="text" name="name" id="name" value="<?= $name; ?>" />
          </td>
        </tr>
        <tr>
          <td class="key">Abbr</td>
          <td>
            <input type="text" name="abbr" id="abbr" value="<?= $abbr; ?>" />
          </td>
        </tr>
          <tr>
            <td class="key">Description</td>
          <td>
            <?= $this->editor->display( 'description', $description, '100%', '150', '40', '5' ) ?>
          </td>
        </tr>      
        <tr>
          <td class="key">Published</td>
          <td>
            <?= JHTML::_('select.booleanlist', 'published', 'class="inputbox"', $published); ?>
          </td>
        </tr>
             </table>
       </fieldset>
     
       <input type="hidden" name="option" value="<?php echo JRequest::getVar( 'option' );?>"/>
       <input type="hidden" name="c" value="<?php echo JRequest::getVar('c', 'division'); ?>" />
       <input type="hidden" name="id" value="<?= $id; ?>"/>      
       <input type="hidden" name="task" value=""/>
	   
	   <input type="hidden" name="pic_id" value="<?= $pic_id ?>"/>
       <input type="hidden" name="logo_pic_id" value="<?= $logo_pic_id ?>"/>
</form>
